home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / AIncludes / AEDataModel.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  21.3 KB  |  720 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        AEDataModel.a
  3. ;
  4. ;    Contains:    AppleEvent Data Model Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1996-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__AEDATAMODEL__') = 'UNDEFINED' THEN
  18. __AEDATAMODEL__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  24.     include 'MixedMode.a'
  25.     ENDIF
  26.  
  27. ;  Apple event descriptor types 
  28.  
  29. typeBoolean                        EQU        'bool'
  30. typeChar                        EQU        'TEXT'
  31. ;  Preferred numeric Apple event descriptor types 
  32.  
  33. typeSInt16                        EQU        'shor'
  34. typeSInt32                        EQU        'long'
  35. typeUInt32                        EQU        'magn'
  36. typeSInt64                        EQU        'comp'
  37. typeIEEE32BitFloatingPoint        EQU        'sing'
  38. typeIEEE64BitFloatingPoint        EQU        'doub'
  39. type128BitFloatingPoint            EQU        'ldbl'
  40. typeDecimalStruct                EQU        'decm'
  41. ;  Non-preferred Apple event descriptor types 
  42.  
  43. typeSMInt                        EQU        'shor'
  44. typeShortInteger                EQU        'shor'
  45. typeInteger                        EQU        'long'
  46. typeLongInteger                    EQU        'long'
  47. typeMagnitude                    EQU        'magn'
  48. typeComp                        EQU        'comp'
  49. typeSMFloat                        EQU        'sing'
  50. typeShortFloat                    EQU        'sing'
  51. typeFloat                        EQU        'doub'
  52. typeLongFloat                    EQU        'doub'
  53. typeExtended                    EQU        'exte'
  54. ;  More Apple event descriptor types 
  55.  
  56. typeAEList                        EQU        'list'
  57. typeAERecord                    EQU        'reco'
  58. typeAppleEvent                    EQU        'aevt'
  59. typeEventRecord                    EQU        'evrc'
  60. typeTrue                        EQU        'true'
  61. typeFalse                        EQU        'fals'
  62. typeAlias                        EQU        'alis'
  63. typeEnumerated                    EQU        'enum'
  64. typeType                        EQU        'type'
  65. typeAppParameters                EQU        'appa'
  66. typeProperty                    EQU        'prop'
  67. typeFSS                            EQU        'fss '
  68. typeKeyword                        EQU        'keyw'
  69. typeSectionH                    EQU        'sect'
  70. typeWildCard                    EQU        '****'
  71. typeApplSignature                EQU        'sign'
  72. typeQDRectangle                    EQU        'qdrt'
  73. typeFixed                        EQU        'fixd'
  74. typeSessionID                    EQU        'ssid'
  75. typeTargetID                    EQU        'targ'
  76. typeProcessSerialNumber            EQU        'psn '
  77. typeKernelProcessID                EQU        'kpid'
  78. typeDispatcherID                EQU        'dspt'
  79. typeNull                        EQU        'null'                ; null or nonexistent data 
  80. ;  Keywords for Apple event attributes 
  81.  
  82. keyTransactionIDAttr            EQU        'tran'
  83. keyReturnIDAttr                    EQU        'rtid'
  84. keyEventClassAttr                EQU        'evcl'
  85. keyEventIDAttr                    EQU        'evid'
  86. keyAddressAttr                    EQU        'addr'
  87. keyOptionalKeywordAttr            EQU        'optk'
  88. keyTimeoutAttr                    EQU        'timo'
  89. keyInteractLevelAttr            EQU        'inte'                ; this attribute is read only - will be set in AESend 
  90. keyEventSourceAttr                EQU        'esrc'                ; this attribute is read only 
  91. keyMissedKeywordAttr            EQU        'miss'                ; this attribute is read only 
  92. keyOriginalAddressAttr            EQU        'from'                ; new in 1.0.1 
  93.  
  94. ;     Constants used for specifying the factoring of AEDescLists. 
  95.  
  96. kAEDescListFactorNone            EQU        0
  97. kAEDescListFactorType            EQU        4
  98. kAEDescListFactorTypeAndSize    EQU        8
  99. ;  Constants used creating an AppleEvent 
  100.  
  101.                                                             ; Constant for the returnID param of AECreateAppleEvent 
  102. kAutoGenerateReturnID            EQU        -1                    ; AECreateAppleEvent will generate a session-unique ID 
  103.                                                             ; Constant for transaction ID’s 
  104. kAnyTransactionID                EQU        0                    ; no transaction is in use 
  105. ;  Apple event manager data types 
  106. ; typedef ResType                         DescType
  107.  
  108. ; typedef FourCharCode                     AEKeyword
  109.  
  110. AEDesc                    RECORD 0
  111. descriptorType             ds.l    1                ; offset: $0 (0)
  112. dataHandle                 ds.l    1                ; offset: $4 (4)
  113. sizeof                     EQU *                    ; size:   $8 (8)
  114.                         ENDR
  115. ; typedef struct AEDesc *                AEDescPtr
  116.  
  117. AEKeyDesc                RECORD 0
  118. descKey                     ds.l    1                ; offset: $0 (0)
  119. descContent                 ds        AEDesc            ; offset: $4 (4)
  120. sizeof                     EQU *                    ; size:   $C (12)
  121.                         ENDR
  122. ;  a list of AEDesc's is a special kind of AEDesc 
  123. AEDescList                RECORD 0
  124. f                         ds        AEDesc
  125. sizeof                     EQU *                    ; size:   $8 (8)
  126.                         ENDR
  127.  
  128.  
  129. ;  AERecord is a list of keyworded AEDesc's 
  130. AERecord                RECORD 0
  131. f                         ds        AEDescList
  132. sizeof                     EQU *                    ; size:   $8 (8)
  133.                         ENDR
  134.  
  135.  
  136. ;  an AEDesc which contains address data 
  137. AEAddressDesc            RECORD 0
  138. f                         ds        AEDesc
  139. sizeof                     EQU *                    ; size:   $8 (8)
  140.                         ENDR
  141.  
  142.  
  143. ;  an AERecord that contains an AppleEvent, and related data types 
  144. AppleEvent                RECORD 0
  145. f                         ds        AERecord
  146. sizeof                     EQU *                    ; size:   $8 (8)
  147.                         ENDR
  148.  
  149.  
  150. ; typedef struct AppleEvent *            AppleEventPtr
  151.  
  152. ; typedef SInt16                         AEReturnID
  153.  
  154. ; typedef SInt32                         AETransactionID
  155.  
  156. ; typedef FourCharCode                     AEEventClass
  157.  
  158. ; typedef FourCharCode                     AEEventID
  159.  
  160. ; typedef SInt8                         AEArrayType
  161.  
  162.  
  163. kAEDataArray                    EQU        0
  164. kAEPackedArray                    EQU        1
  165. kAEDescArray                    EQU        3
  166. kAEKeyDescArray                    EQU        4
  167.  
  168.  
  169. kAEHandleArray                    EQU        2
  170. AEArrayData                RECORD 0
  171. kAEDataArray             ds.w    1                ; offset: $0 (0) <-- really an array of length one
  172.                          ORG 0
  173. kAEPackedArray             ds.b    1                ; offset: $0 (0) <-- really an array of length one
  174.                          ORG 0
  175. kAEHandleArray             ds.l    1                ; offset: $0 (0) <-- really an array of length one
  176.                          ORG 0
  177. kAEDescArray             ds        AEDesc            ; offset: $0 (0) <-- really an array of length one
  178.                          ORG 0
  179. kAEKeyDescArray             ds        AEKeyDesc        ; offset: $0 (0) <-- really an array of length one
  180. sizeof                     EQU *                    ; size:   $C (12)
  181.                         ENDR
  182. ; typedef union AEArrayData *            AEArrayDataPointer
  183.  
  184.  
  185. ; **************************************************************************
  186. ;  These calls are used to set up and modify the coercion dispatch table.
  187. ;*************************************************************************
  188.  
  189. ; typedef UniversalProcPtr                 AECoercionHandlerUPP
  190.  
  191. ;
  192. ; pascal OSErr AEInstallCoercionHandler(DescType fromType, DescType toType, AECoercionHandlerUPP handler, long handlerRefcon, Boolean fromTypeIsDesc, Boolean isSysHandler)
  193. ;
  194.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  195.         Macro
  196.         _AEInstallCoercionHandler
  197.             move.w              #$0A22,D0
  198.             dc.w                $A816
  199.         EndM
  200.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  201.         IMPORT_CFM_FUNCTION AEInstallCoercionHandler
  202.     ENDIF
  203.  
  204. ;
  205. ; pascal OSErr AERemoveCoercionHandler(DescType fromType, DescType toType, AECoercionHandlerUPP handler, Boolean isSysHandler)
  206. ;
  207.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  208.         Macro
  209.         _AERemoveCoercionHandler
  210.             move.w              #$0723,D0
  211.             dc.w                $A816
  212.         EndM
  213.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  214.         IMPORT_CFM_FUNCTION AERemoveCoercionHandler
  215.     ENDIF
  216.  
  217. ;
  218. ; pascal OSErr AEGetCoercionHandler(DescType fromType, DescType toType, AECoercionHandlerUPP *handler, long *handlerRefcon, Boolean *fromTypeIsDesc, Boolean isSysHandler)
  219. ;
  220.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  221.         Macro
  222.         _AEGetCoercionHandler
  223.             move.w              #$0B24,D0
  224.             dc.w                $A816
  225.         EndM
  226.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  227.         IMPORT_CFM_FUNCTION AEGetCoercionHandler
  228.     ENDIF
  229.  
  230. ; **************************************************************************
  231. ;  The following calls provide for a coercion interface.
  232. ;*************************************************************************
  233.  
  234. ;
  235. ; pascal OSErr AECoercePtr(DescType typeCode, const void *dataPtr, Size dataSize, DescType toType, AEDesc *result)
  236. ;
  237.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  238.         Macro
  239.         _AECoercePtr
  240.             move.w              #$0A02,D0
  241.             dc.w                $A816
  242.         EndM
  243.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  244.         IMPORT_CFM_FUNCTION AECoercePtr
  245.     ENDIF
  246.  
  247. ;
  248. ; pascal OSErr AECoerceDesc(const AEDesc *theAEDesc, DescType toType, AEDesc *result)
  249. ;
  250.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  251.         Macro
  252.         _AECoerceDesc
  253.             move.w              #$0603,D0
  254.             dc.w                $A816
  255.         EndM
  256.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  257.         IMPORT_CFM_FUNCTION AECoerceDesc
  258.     ENDIF
  259.  
  260.  
  261. ; **************************************************************************
  262. ; The following calls apply to any AEDesc. Every 'result' descriptor is
  263. ; created for you, so you will be responsible for memory management
  264. ; (including disposing) of the descriptors so created.  
  265. ;*************************************************************************
  266.  
  267. ;
  268. ; pascal OSErr AECreateDesc(DescType typeCode, const void *dataPtr, Size dataSize, AEDesc *result)
  269. ;
  270.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  271.         Macro
  272.         _AECreateDesc
  273.             move.w              #$0825,D0
  274.             dc.w                $A816
  275.         EndM
  276.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  277.         IMPORT_CFM_FUNCTION AECreateDesc
  278.     ENDIF
  279.  
  280. ;
  281. ; pascal OSErr AEDisposeDesc(AEDesc *theAEDesc)
  282. ;
  283.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  284.         Macro
  285.         _AEDisposeDesc
  286.             move.w              #$0204,D0
  287.             dc.w                $A816
  288.         EndM
  289.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  290.         IMPORT_CFM_FUNCTION AEDisposeDesc
  291.     ENDIF
  292.  
  293. ;
  294. ; pascal OSErr AEDuplicateDesc(const AEDesc *theAEDesc, AEDesc *result)
  295. ;
  296.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  297.         Macro
  298.         _AEDuplicateDesc
  299.             move.w              #$0405,D0
  300.             dc.w                $A816
  301.         EndM
  302.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  303.         IMPORT_CFM_FUNCTION AEDuplicateDesc
  304.     ENDIF
  305.  
  306.  
  307. ; **************************************************************************
  308. ;  The following calls apply to AEDescList. Since AEDescList is a subtype of
  309. ;  AEDesc, the calls in the previous section can also be used for AEDescList.
  310. ;  All list and array indices are 1-based. If the data was greater than
  311. ;  maximumSize in the routines below, then actualSize will be greater than
  312. ;  maximumSize, but only maximumSize bytes will actually be retrieved.
  313. ;*************************************************************************
  314.  
  315. ;
  316. ; pascal OSErr AECreateList(const void *factoringPtr, Size factoredSize, Boolean isRecord, AEDescList *resultList)
  317. ;
  318.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  319.         Macro
  320.         _AECreateList
  321.             move.w              #$0706,D0
  322.             dc.w                $A816
  323.         EndM
  324.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  325.         IMPORT_CFM_FUNCTION AECreateList
  326.     ENDIF
  327.  
  328. ;
  329. ; pascal OSErr AECountItems(const AEDescList *theAEDescList, long *theCount)
  330. ;
  331.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  332.         Macro
  333.         _AECountItems
  334.             move.w              #$0407,D0
  335.             dc.w                $A816
  336.         EndM
  337.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  338.         IMPORT_CFM_FUNCTION AECountItems
  339.     ENDIF
  340.  
  341. ;
  342. ; pascal OSErr AEPutPtr(AEDescList *theAEDescList, long index, DescType typeCode, const void *dataPtr, Size dataSize)
  343. ;
  344.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  345.         Macro
  346.         _AEPutPtr
  347.             move.w              #$0A08,D0
  348.             dc.w                $A816
  349.         EndM
  350.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  351.         IMPORT_CFM_FUNCTION AEPutPtr
  352.     ENDIF
  353.  
  354. ;
  355. ; pascal OSErr AEPutDesc(AEDescList *theAEDescList, long index, const AEDesc *theAEDesc)
  356. ;
  357.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  358.         Macro
  359.         _AEPutDesc
  360.             move.w              #$0609,D0
  361.             dc.w                $A816
  362.         EndM
  363.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  364.         IMPORT_CFM_FUNCTION AEPutDesc
  365.     ENDIF
  366.  
  367. ;
  368. ; pascal OSErr AEGetNthPtr(const AEDescList *theAEDescList, long index, DescType desiredType, AEKeyword *theAEKeyword, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
  369. ;
  370.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  371.         Macro
  372.         _AEGetNthPtr
  373.             move.w              #$100A,D0
  374.             dc.w                $A816
  375.         EndM
  376.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  377.         IMPORT_CFM_FUNCTION AEGetNthPtr
  378.     ENDIF
  379.  
  380. ;
  381. ; pascal OSErr AEGetNthDesc(const AEDescList *theAEDescList, long index, DescType desiredType, AEKeyword *theAEKeyword, AEDesc *result)
  382. ;
  383.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  384.         Macro
  385.         _AEGetNthDesc
  386.             move.w              #$0A0B,D0
  387.             dc.w                $A816
  388.         EndM
  389.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  390.         IMPORT_CFM_FUNCTION AEGetNthDesc
  391.     ENDIF
  392.  
  393. ;
  394. ; pascal OSErr AESizeOfNthItem(const AEDescList *theAEDescList, long index, DescType *typeCode, Size *dataSize)
  395. ;
  396.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  397.         Macro
  398.         _AESizeOfNthItem
  399.             move.w              #$082A,D0
  400.             dc.w                $A816
  401.         EndM
  402.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  403.         IMPORT_CFM_FUNCTION AESizeOfNthItem
  404.     ENDIF
  405.  
  406. ;
  407. ; pascal OSErr AEGetArray(const AEDescList *theAEDescList, AEArrayType arrayType, AEArrayDataPointer arrayPtr, Size maximumSize, DescType *itemType, Size *itemSize, long *itemCount)
  408. ;
  409.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  410.         Macro
  411.         _AEGetArray
  412.             move.w              #$0D0C,D0
  413.             dc.w                $A816
  414.         EndM
  415.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  416.         IMPORT_CFM_FUNCTION AEGetArray
  417.     ENDIF
  418.  
  419. ;
  420. ; pascal OSErr AEPutArray(AEDescList *theAEDescList, AEArrayType arrayType, const AEArrayData *arrayPtr, DescType itemType, Size itemSize, long itemCount)
  421. ;
  422.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  423.         Macro
  424.         _AEPutArray
  425.             move.w              #$0B0D,D0
  426.             dc.w                $A816
  427.         EndM
  428.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  429.         IMPORT_CFM_FUNCTION AEPutArray
  430.     ENDIF
  431.  
  432. ;
  433. ; pascal OSErr AEDeleteItem(AEDescList *theAEDescList, long index)
  434. ;
  435.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  436.         Macro
  437.         _AEDeleteItem
  438.             move.w              #$040E,D0
  439.             dc.w                $A816
  440.         EndM
  441.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  442.         IMPORT_CFM_FUNCTION AEDeleteItem
  443.     ENDIF
  444.  
  445.  
  446. ; **************************************************************************
  447. ; The following calls apply to AERecord. Since AERecord is a subtype of
  448. ; AEDescList, the calls in the previous sections can also be used for
  449. ; AERecord an AERecord can be created by using AECreateList with isRecord
  450. ; set to true. 
  451. ;*************************************************************************
  452.  
  453. ;  Note: none of the “key” calls were available in the PowerPC 7.x IntefaceLib.
  454. ;  In C, a #define is used to map “key” calls to “param” calls.  In pascal
  455. ;  this mapping is done in externally linked glue code.
  456. ;
  457.  
  458.  
  459. ;
  460. ; pascal OSErr AEPutKeyPtr(AERecord *theAERecord, AEKeyword theAEKeyword, DescType typeCode, const void *dataPtr, Size dataSize)
  461. ;
  462.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  463.         Macro
  464.         _AEPutKeyPtr
  465.             move.w              #$0A0F,D0
  466.             dc.w                $A816
  467.         EndM
  468.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  469.         IMPORT_CFM_FUNCTION AEPutKeyPtr
  470.     ENDIF
  471.  
  472. ;
  473. ; pascal OSErr AEPutKeyDesc(AERecord *theAERecord, AEKeyword theAEKeyword, const AEDesc *theAEDesc)
  474. ;
  475.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  476.         Macro
  477.         _AEPutKeyDesc
  478.             move.w              #$0610,D0
  479.             dc.w                $A816
  480.         EndM
  481.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  482.         IMPORT_CFM_FUNCTION AEPutKeyDesc
  483.     ENDIF
  484.  
  485. ;
  486. ; pascal OSErr AEGetKeyPtr(const AERecord *theAERecord, AEKeyword theAEKeyword, DescType desiredType, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
  487. ;
  488.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  489.         Macro
  490.         _AEGetKeyPtr
  491.             move.w              #$0E11,D0
  492.             dc.w                $A816
  493.         EndM
  494.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  495.         IMPORT_CFM_FUNCTION AEGetKeyPtr
  496.     ENDIF
  497.  
  498. ;
  499. ; pascal OSErr AEGetKeyDesc(const AERecord *theAERecord, AEKeyword theAEKeyword, DescType desiredType, AEDesc *result)
  500. ;
  501.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  502.         Macro
  503.         _AEGetKeyDesc
  504.             move.w              #$0812,D0
  505.             dc.w                $A816
  506.         EndM
  507.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  508.         IMPORT_CFM_FUNCTION AEGetKeyDesc
  509.     ENDIF
  510.  
  511. ;
  512. ; pascal OSErr AESizeOfKeyDesc(const AERecord *theAERecord, AEKeyword theAEKeyword, DescType *typeCode, Size *dataSize)
  513. ;
  514.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  515.         Macro
  516.         _AESizeOfKeyDesc
  517.             move.w              #$0829,D0
  518.             dc.w                $A816
  519.         EndM
  520.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  521.         IMPORT_CFM_FUNCTION AESizeOfKeyDesc
  522.     ENDIF
  523.  
  524. ;
  525. ; pascal OSErr AEDeleteKeyDesc(AERecord *theAERecord, AEKeyword theAEKeyword)
  526. ;
  527.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  528.         Macro
  529.         _AEDeleteKeyDesc
  530.             move.w              #$0413,D0
  531.             dc.w                $A816
  532.         EndM
  533.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  534.         IMPORT_CFM_FUNCTION AEDeleteKeyDesc
  535.     ENDIF
  536.  
  537. ; **************************************************************************
  538. ;  The following calls create and manipulate the AppleEvent data type.
  539. ;*************************************************************************
  540.  
  541. ;
  542. ; pascal OSErr AECreateAppleEvent(AEEventClass theAEEventClass, AEEventID theAEEventID, const AEAddressDesc *target, AEReturnID returnID, AETransactionID transactionID, AppleEvent *result)
  543. ;
  544.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  545.         Macro
  546.         _AECreateAppleEvent
  547.             move.w              #$0B14,D0
  548.             dc.w                $A816
  549.         EndM
  550.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  551.         IMPORT_CFM_FUNCTION AECreateAppleEvent
  552.     ENDIF
  553.  
  554.  
  555. ; **************************************************************************
  556. ;  The following calls are used to pack and unpack parameters from records
  557. ;  of type AppleEvent. Since AppleEvent is a subtype of AERecord, the calls
  558. ;  in the previous sections can also be used for variables of type
  559. ;  AppleEvent. The next six calls are in fact identical to the six calls
  560. ;  for AERecord.
  561. ;*************************************************************************
  562.  
  563. ;
  564. ; pascal OSErr AEPutParamPtr(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType typeCode, const void *dataPtr, Size dataSize)
  565. ;
  566.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  567.         Macro
  568.         _AEPutParamPtr
  569.             move.w              #$0A0F,D0
  570.             dc.w                $A816
  571.         EndM
  572.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  573.         IMPORT_CFM_FUNCTION AEPutParamPtr
  574.     ENDIF
  575.  
  576. ;
  577. ; pascal OSErr AEPutParamDesc(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, const AEDesc *theAEDesc)
  578. ;
  579.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  580.         Macro
  581.         _AEPutParamDesc
  582.             move.w              #$0610,D0
  583.             dc.w                $A816
  584.         EndM
  585.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  586.         IMPORT_CFM_FUNCTION AEPutParamDesc
  587.     ENDIF
  588.  
  589. ;
  590. ; pascal OSErr AEGetParamPtr(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
  591. ;
  592.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  593.         Macro
  594.         _AEGetParamPtr
  595.             move.w              #$0E11,D0
  596.             dc.w                $A816
  597.         EndM
  598.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  599.         IMPORT_CFM_FUNCTION AEGetParamPtr
  600.     ENDIF
  601.  
  602. ;
  603. ; pascal OSErr AEGetParamDesc(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, AEDesc *result)
  604. ;
  605.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  606.         Macro
  607.         _AEGetParamDesc
  608.             move.w              #$0812,D0
  609.             dc.w                $A816
  610.         EndM
  611.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  612.         IMPORT_CFM_FUNCTION AEGetParamDesc
  613.     ENDIF
  614.  
  615. ;
  616. ; pascal OSErr AESizeOfParam(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType *typeCode, Size *dataSize)
  617. ;
  618.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  619.         Macro
  620.         _AESizeOfParam
  621.             move.w              #$0829,D0
  622.             dc.w                $A816
  623.         EndM
  624.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  625.         IMPORT_CFM_FUNCTION AESizeOfParam
  626.     ENDIF
  627.  
  628. ;
  629. ; pascal OSErr AEDeleteParam(AppleEvent *theAppleEvent, AEKeyword theAEKeyword)
  630. ;
  631.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  632.         Macro
  633.         _AEDeleteParam
  634.             move.w              #$0413,D0
  635.             dc.w                $A816
  636.         EndM
  637.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  638.         IMPORT_CFM_FUNCTION AEDeleteParam
  639.     ENDIF
  640.  
  641.  
  642.  
  643. ; **************************************************************************
  644. ; The following calls also apply to type AppleEvent. Message attributes are
  645. ; far more restricted, and can only be accessed through the following 5
  646. ; calls. The various list and record routines cannot be used to access the
  647. ; attributes of an event. 
  648. ;*************************************************************************
  649.  
  650. ;
  651. ; pascal OSErr AEGetAttributePtr(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
  652. ;
  653.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  654.         Macro
  655.         _AEGetAttributePtr
  656.             move.w              #$0E15,D0
  657.             dc.w                $A816
  658.         EndM
  659.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  660.         IMPORT_CFM_FUNCTION AEGetAttributePtr
  661.     ENDIF
  662.  
  663. ;
  664. ; pascal OSErr AEGetAttributeDesc(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, AEDesc *result)
  665. ;
  666.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  667.         Macro
  668.         _AEGetAttributeDesc
  669.             move.w              #$0826,D0
  670.             dc.w                $A816
  671.         EndM
  672.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  673.         IMPORT_CFM_FUNCTION AEGetAttributeDesc
  674.     ENDIF
  675.  
  676. ;
  677. ; pascal OSErr AESizeOfAttribute(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType *typeCode, Size *dataSize)
  678. ;
  679.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  680.         Macro
  681.         _AESizeOfAttribute
  682.             move.w              #$0828,D0
  683.             dc.w                $A816
  684.         EndM
  685.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  686.         IMPORT_CFM_FUNCTION AESizeOfAttribute
  687.     ENDIF
  688.  
  689. ;
  690. ; pascal OSErr AEPutAttributePtr(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType typeCode, const void *dataPtr, Size dataSize)
  691. ;
  692.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  693.         Macro
  694.         _AEPutAttributePtr
  695.             move.w              #$0A16,D0
  696.             dc.w                $A816
  697.         EndM
  698.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  699.         IMPORT_CFM_FUNCTION AEPutAttributePtr
  700.     ENDIF
  701.  
  702. ;
  703. ; pascal OSErr AEPutAttributeDesc(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, const AEDesc *theAEDesc)
  704. ;
  705.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  706.         Macro
  707.         _AEPutAttributeDesc
  708.             move.w              #$0627,D0
  709.             dc.w                $A816
  710.         EndM
  711.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  712.         IMPORT_CFM_FUNCTION AEPutAttributeDesc
  713.     ENDIF
  714.  
  715.  
  716.  
  717.     ENDIF ; __AEDATAMODEL__ 
  718.  
  719.